<template>
  <EleTableComp :config="config"></EleTableComp>
</template>
<script>
import EleTableComp from "@/components/EleTableComp";
import { typeJson } from "@/components/EleTableComp/config.js";
export default {
  data() {
    return {
      config: {
        header: {
          breadcrumb: `隐患制度`,
          addButton: true,
          mineType: 1,
          search: [
            {
              type: "input",
              prop: "riskName",
              placeholder: "",
              value: "",
              label: "制度名称",
            },
          ],
        },
        table: [
          {
            type: "index",
            addEditHidden: true,
          },
          {
            label: "制度名称",
            prop: "riskName",
            value: "",
            required: true,
          },
          {
            label: "隐患分类",
            prop: "riskType",
            type: "dropDown",
            addEditType: "dropDown",
            list: typeJson.riskTypebase,
            value: "",
          },
          {
            label: "目的",
            prop: "dest",
            value: "",
          },
          {
            label: "隐患整治工作原则",
            prop: "workRule",
            value: "",
            hidden: true,
            addEditType: "textArea",
          },
          {
            label: "检查类型",
            prop: "checkType",
            type: "dropDown",
            addEditType: "dropDown",
            list: typeJson.riskRule,
            value: "",
            required: true,
          },
          {
            label: "排查治理工作方法",
            prop: "govenScheme",
            hidden: true,
            value: "",
            addEditType: "textArea",
          },
          {
            label: "整改和上报机制",
            prop: "reportRule",
            value: "",
            hidden: true,
            addEditType: "textArea",
          },
          {
            label: "排查治理内容",
            prop: "checkContent",
            value: "",
            addEditHidden: true,
          },
          {
            label: "附件",
            prop: "docPath",
            type: "download",
            addEditType: "upload",
            value: "",
            required: true,
            mediaOnly: true,
          },
          {
            label: "操作",
            prop: "", // 传数据的时候 忽略
            type: "operation",
            addEditHidden: true,
            isParam: false,
            edit: true,
            delete: true,
            look: true,
            mineType: 1,
          },
        ],
        update: {
          url: "/app/riskRule/update",
          method: "POST",
          data: this.form,
        },
        delete: {
          url: "/app/riskRule/delete",
          method: "GET",
          id: -1,
        },
        insert: {
          url: "/app/riskRule/insert",
          method: "POST",
          data: this.form,
          mineId: true,
        },
        select: {
          url: "/app/riskRule/getList",
          method: "POST",
          mineId: true,
          currentPage: 1,
          pageSize: 10,
        },
      },
    };
  },
  components: {
    EleTableComp,
  },
};
</script>